home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / tsp.h < prev    next >
Text File  |  1993-08-23  |  3KB  |  79 lines

  1. /* 11:00 30-Aug-87 (tsp.h) travelling Salesman Problem header file   */
  2.  
  3. /************************************************************************
  4.  * Copyright(C) 1987-1992 NeuralWare Inc                                *
  5.  * Penn Center West, IV-227, Pittsburgh, PA 15276                       *
  6.  * Telephone: (412) 787-8222    FAX: (412) 787-8220                     *
  7.  *                                                                      *
  8.  * All rights reserved.  No part of this program may be reproduced,     *
  9.  * stored in a retrieval system, or transmitted, in any form or by any  *
  10.  * means, electronic, mechanical, photocopying, recording or otherwise  *
  11.  * without the prior written permission of the copyright owner,         *
  12.  * NeuralWare, Inc.                                                     *
  13.  *                                                                      *
  14.  *                          PROPRIETARY NOTICE                          *
  15.  *                                                                      *
  16.  * This document is the property of NeuralWare, Inc. and contains       *
  17.  * trade-secrets and other proprietary information.  The information    *
  18.  * herein is reserved as proprietary to NeuralWare, and is not to be    *
  19.  * published, reproduced, copied, disclosed, used, or reverse           *
  20.  * engineered without the express written consent of a duly authorized  *
  21.  * representative of NeuralWare.                                        *
  22.  ************************************************************************
  23.  */
  24.  
  25. /************************************************************************/
  26. /*                  */
  27. /*  TSP build structures for cities         */
  28. /*                  */
  29. /************************************************************************/
  30.  
  31. #define DEFAULT_CITY_FILE_NAME "city"   /* the default name for read/write */
  32. #define DEFAULT_NET_FILE_NAME "tsp.ins" /* the default file name for write */
  33.  
  34. /* Network energy functions */
  35. #define HOPF 0
  36. #define SZU  1
  37. #define Other 2
  38.  
  39. #ifdef SUN
  40. #define MAX_NUM_CITIES 30
  41. #else
  42. #define MAX_NUM_CITIES 15
  43. #endif
  44.  
  45. #ifdef SUN
  46. #define MAX_CITY_NAME_SIZE  30
  47. #else
  48. #define MAX_CITY_NAME_SIZE  10
  49. #endif
  50.  
  51. struct city {
  52.   char name[MAX_CITY_NAME_SIZE];
  53.   REAL xloc;
  54.   REAL yloc;
  55.   REAL dist[MAX_NUM_CITIES];
  56.   };
  57.  
  58. typedef struct city CITY;
  59.  
  60. /************************************************************************/
  61. /*                  */
  62. /*  TSP constants for network build         */
  63. /*                  */
  64. /************************************************************************/
  65.  
  66.  
  67. #define NLAY  5   /* layer control blocks to allocate */
  68. #define NPES  5*MAX_NUM_CITIES*MAX_NUM_CITIES /* # of pes to work with */
  69. #define NCONN_PER_CITY  4
  70. #define NCONN NCONN_PER_CITY*MAX_NUM_CITIES /* max # conns in a PE */
  71.  
  72.  
  73. #define NTEST 1       /* number of test inputs */
  74. #define NINPUT  MAX_NUM_CITIES*MAX_NUM_CITIES   /* number of inputs/test */
  75. #define NOUTPUT MAX_NUM_CITIES*MAX_NUM_CITIES   /* number of outputs/test */
  76.  
  77. #define FIXED_WT 1
  78. #define MOD_WT   0
  79.